using Engine;
using Game;
using GameEntitySystem;

namespace SCIENEW {
    public class CokeOvenDevice : IlluminableDevice, ICrafterDevice<ComponentCokeOven>, IElectricElementDevice {
        public CokeOvenDevice() : base(
            "CokeOvenDevice",
            173,
            242,
            174,
            4,
            4
        ) {
            DownSlot = 4;
        }

        public override string GetSoundMaterialName(SubsystemTerrain subsystemTerrain, int value) => "Stone";

        public string GetEntityName(int value) => "CokeOven";

        public Widget GetWidget(IInventory inventory, ComponentCokeOven component) => new CokeOvenWidget(inventory, component);

        public override DeviceBehavior[] GetBehaviors(Project project) => [new CokeOvenDeviceBehavior(project)];

        public ElectricElement CreateElectricElement(SubsystemElectricity subsystemElectricity, int value, int x, int y, int z) => new CrafterPopResultsElectricElement(subsystemElectricity, new Point3(x, y, z), GetDirection(value));

        public ElectricConnectorType? GetConnectorType(SubsystemTerrain terrain, int value, int face, int connectorFace, int x, int y, int z) => ElectricConnectorType.Input;

        public int GetConnectionMask(int value) => int.MaxValue;
    }
}